﻿using System.Collections.Generic;

namespace Yuchen.NPA.Core
{
    public interface INpaRepository<TEntity, TKey>
    {
        IEnumerable<TEntity> FindAll();
        TEntity FindOne(TKey key);
        TEntity Add(TEntity entity);
        TEntity AddSave(TEntity entity);
        void Delete(TEntity entity);
        void Delete(TKey key);
        void DeleteSave(TKey key);
        void DeleteSave(TEntity entity);
        void Save();
        long Count();
        bool Exists(TKey key);
    }
}
